package wang.chuangen.session.util;

import java.io.IOException;

/**
 * 序列化工具接口
 * @author 王传根
 * @date 2016-5-13上午8:54:32
 */
public interface Serialization {

	/**
	 * 序列化Object数据
	 * @param data
	 * @return
	 * @author 王传根
	 * @throws IOException 
	 * @date 2016-5-13上午8:57:34
	 */
	public byte[] toObjectByte(Object data) throws IOException;
	
	/**
	 * 反序列化Object数据
	 * @param data
	 * @return
	 * @author 王传根
	 * @throws IOException 
	 * @throws ClassNotFoundException 
	 * @throws IllegalAccessException 
	 * @throws InstantiationException 
	 * @date 2016-5-13上午8:57:57
	 */
	public Object parseObjectByte(byte[] data) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException;
}
